# Contributor: Veikka Valtteri Kallinen <valtteri@kallinen.xyz>
# Maintainer: Veikka Valtteri Kallinen <valtteri@kallinen.xyz>
pkgname=drumgizmo
pkgver=0.9.20
pkgrel=1
pkgdesc="Multichannel, multilayered, cross-platform drum plugin"
url="https://www.drumgizmo.org"
arch="all"
license="GPL-3.0-only"
makedepends="libx11-dev libxext-dev libsndfile-dev lv2-dev"
source="http://www.drumgizmo.org/releases/drumgizmo-$pkgver/drumgizmo-$pkgver.tar.gz
	gcc13.patch
	"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	CXXFLAGS="$CXXFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-lv2 \
		--disable-cli \
		--disable-sse \
		--without-nls
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	# manpages are for the disabled cli tool
	rm -r "$pkgdir"/usr/share/man
}

sha512sums="
3444201961d74e7787bebe4006df6c257f6c1a57dd81d272b203a4a56ad609d3fa4e88224dfe4ea6a67f4db94b340666d018cb79fc376dd264398f98d66433e8  drumgizmo-0.9.20.tar.gz
ed13d9cce9c12cd2b8df3661442481660a66b5ccfc3129920811a79fdd3150bdff627cb96c7bb17c21a5dd3b94b34268328fb8e557d2611b2fa80284e02b6605  gcc13.patch
"
